{% extends "base_u.tpl" %}
 
{% block page_content %}
          <p class="page_header">{# { page_header } #} {{ page.Title }}</p>
          
          <p class="page_content">{{ page.Content }}</p>

          {% ifnotequal action 'error' %}
            <div id="head">
              {% if logo %}
                <img id="logo" src="{{ logo }}" alt="{{ title }}">
              {% else %}
                <img id="logo" src="/images/videologo.png" alt="{{ title }}">
              {% endif %}
              <div id="entrysheader">
                <span class="title">{{ title }}</span><br>
                <span class="item_description">
                  <span class="param">Автор:</span> <span class="val">{{ author }}</span><br>
                  <span class="param">Обновлено:</span> <span class="val">{{ updated }}</span><br>
                  {% if total %}
                    <span class="param">Всего видео:</span> <span class="val">{{ total }}</span><br>
                  {% endif %}
                </span>
              </div>
            </div>

            {% ifequal action 'playlists' %}
              {% for playlist in entrys %}
                <div class="item">
                  <a href="/video?playlistid={{ playlist.id }}">
                    <span class="item_title">{{ playlist.title }}</span>
                  </a>
                  <br>
                  <span class="item_description">
                    {# <span class="param">ID:</span> <span class="val">{{ playlist.id }}</span><br> #}
                    <span class="param">Описание:</span> <span class="val">{{ playlist.description }}</span><br>
                    {# <span class="param">Содержание:</span> <span class="val">{{ playlist.content }}</span><br> #}
                    <span class="param">Обновлено:</span> <span class="val">{{ playlist.updated }}</span><br>
                    <span class="param">Опубликовано:</span> <span class="val">{{ playlist.published }}</span><br>
                  </span>
                </div>
              {% endfor %}
            {% endifequal %}

            {% ifequal action 'playlist' %}
              {% for video in entrys %}
                <div class="item">
                  <a href="/video?videoid={{ video.id }}">
                    <img class="thumb" src="{{ video.thumb }}" alt="{{ video.title }}">
                    <span class="item_title">{{ video.title }}</span>
                  </a>
                  <br>
                  <span class="item_description">
                    {# <span class="param">ID:</span> <span class="val">{{ video.id }}</span><br> #}
                    <span class="param">Описание:</span> <span class="val">{{ video.description }}</span><br>
                    {# <span class="param">Содержание:</span> <span class="val">{{ video.content }}</span><br> #}
                    <span class="param">Обновлено:</span> <span class="val">{{ video.updated }}</span><br>
                    {# <span class="param">Опубликовано:</span> <span class="val">{{ video.published }}</span><br> #}
                  </span>
                </div>
              {% endfor %}
            {% endifequal %}
            
            {% ifequal action 'video' %}
              <div class="item">
                <script type="text/javascript" src="/scripts/swfobject.js"></script>
                <script type="text/javascript">
                  theVideofile = "{{ entrys.player }}&fmt%3D18"
                  {% ifequal playersource 'my' %}
                    SwfURL = "/scripts/player.swf"
                  {% else %}
                    SwfURL = "{{ entrys.video }}"
                  {% endifequal %}
                </script>
                <script type="text/javascript" src="/scripts/player.js"></script>
                <div id="myPlayer">
                  Для просмотра этого видео требуется Adobe Flash player версии 9 и выше.<br>
                  Проверить версию <a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15507" target=_blank>установленного Flash проигрывателя</a>.<br>
                  Скачать плеер для просмотра этого видео:<br><br>
                  <a href="http://www.adobe.com/go/getflashplayer">
                    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Скачать Adobe Flash player" target=_blank>
                  </a>
                </div>
                <span class="item_description">
                  <span class="param">GEO:</span> <span class="val">{{ entrys.geo }}</span><br>
                  <span class="param">Сводка:</span> <span class="val">{{ entrys.summary }}</span><br>
                  <span class="param">Описание:</span> <span class="val">{{ entrys.description }}</span><br>
                  {# <span class="param">Плеер:</span> <span class="val">{{ entrys.player }}</span><br> #}
                  <span class="param">Длительность:</span> <span class="val">{{ entrys.duration }} сек.</span><br>
                  {# <span class="param">video:</span> <span class="val">{{ entrys.video }}</span><br> #}
              </div>
            {% endifequal %}
          {% else %}
            <p style="font-weight: bold; font-size: x-large; text-align: center; color: red;">
              {{ entrys.error }}
            </p>
          {% endifnotequal %}
{% endblock %}